using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WindEnergyBottle : MonoBehaviour
{
    public GameObject particlePrefab;
    float bonusValue;
    private void Start()
    {
        bonusValue = 30;
    }
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player"))
        {
            other.GetComponentInChildren<PlayerCharacter>().SetWindPower(bonusValue);
            Vector3 particlePosition = new Vector3(transform.position.x, transform.position.y + 2.5f, transform.position.z);
            Instantiate(particlePrefab, particlePosition, Quaternion.identity);
            Destroy(gameObject);
        }
    }
}
